extends layout

block content
    h1= title
    p #{author.birth_death}
    if author_books.length
        p #[strong 删除当前作家前，必须先删除名下对应的书籍]
        div(style='margin-left:20px;margin-top:20px')
            h4 对应书籍
            dl
            each book in author_books
                dt
                    a(href=book.url) #{book.title}
                dd #{book.summary}
    else
        p 确定要删除当前作家么？

        form(method='post', action='')
            div.form-group
                input#authorid.form-control(type='hidden', name='authorid', value=author._id)
            button.btn.btn-primary(type='submit') 确定删除